﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.IO;
using System.Linq;

using ProjectBase.Core;

using $safeprojectname$.Data.Services;
using $prjsn$.Entity.Services;

namespace $safeprojectname$.Business.Services
{
    /// <summary>
    ///     All Business checks for 'Attachment' on CRUD operations
    ///     are nested and encapsulated in this AttachmentFacade
    /// </summary>
    public interface IAttachmentFacade : IFacade
    {
        Attachment CreateNew();
        Attachment CreateNew(string fileName, string contentType, Stream inputStream, Article article);

        IEnumerable<Attachment> GetByArticle(Article article);
        Attachment GetByName(string fileName, Article article);

        Attachment AddOrUpdate(Attachment entity);
        void Delete(Attachment entity);
        void ClearAttachments(Article article);

        // IoC
        IAttachmentDao Dao { set; }
        IContentTypeFacade ContentTypeFacade { set; }
    }
}